/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

// eslint-disable-next-line import/no-extraneous-dependencies
import { Request, Response } from 'express';
import { mock } from 'mockjs';
import { responseSuccess } from './utils';

export default {
  'POST /CustomerServiceV2/smsSign': (req: Request, res: Response) => {
    return res.json(
      mock({
        code: 0,
        msg: '成功',
        data: {
          total_page: 1,
          page_num: '1',
          total_records: '100',
          'desc|10': [
            {
              ssid: '@id',
              kb_id: '@id',
              phone: '18217690146',
              sign: '@csentence',
              create_time: '@datetime',
              approve_time: '@datetime',
              operator: '@cname',
              'source|1': ['kdy', 'yz', 'open'],
            },
          ],
        },
      }),
    );
  },
  'POST /CustomerServiceV2/smsTemplate': (req: Request, res: Response) => {
    return res.json(
      mock({
        code: 0,
        msg: '成功',
        data: {
          total_page: 1,
          page_num: '1',
          total_records: '100',
          'desc|10': [
            {
              tid: /\d{11}/,
              cm_app_id: '@id',
              cm_phone: '@id',
              // content: '@csentence',
              content: '我们啊点啊微信啊啥的话爱微信上的啊死大睡的',
              sensitive_word: '微信',
              apply_time: '@datetime',
              approve_time: '@datetime',
              state: 'indeterminate',
              type: 'sms',
              kb_id: /\d{11}/,
              cm_phone_color: 'red',
              user_type: '驿站',
              'ai_label|1': ['reject', 'approved', 'suspicious'],
            },
          ],
        },
      }),
    );
  },
  'POST /CustomerServiceV2/smsTemplateBlack': responseSuccess,
  'POST /CustomerServiceV2/smsSignApproval': responseSuccess,
  'POST /CustomerServiceV2/smsTemplateApproval': responseSuccess,
  'POST /CustomerServiceV2/vipSmsTemplate': (req: Request, res: Response) => {
    return res.json(
      mock({
        code: 0,
        msg: '成功',
        data: {
          total_page: 1,
          page_num: '1',
          total_records: '100',
          'desc|10': [
            {
              tid: /\d{11}/,
              cm_app_id: '@id',
              cm_phone: '@id',
              // content: '@csentence',
              content: '我们啊点啊微信啊啥的话爱微信上的啊死大睡的',
              sensitive_word: '微信',
              apply_time: '@datetime',
              approve_time: '@datetime',
              state: 'indeterminate',
              type: 'sms',
              kb_id: /\d{11}/,
              cm_phone_color: 'red',
              user_type: '驿站',
            },
          ],
        },
      }),
    );
  },
  'POST /CustomerServiceV2/vipsmsTemplateApproval': responseSuccess,
};
